// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_PRODUCT_TYPE
// * CreateDate    : 2014-06-05 18:30:17
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:17
// * LastChanger   : 2014-06-05 18:30:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstProductTypeEntity : EntityBase
    {
        public MstProductTypeTable TableSchema
        {
            get
            {
                return MstProductTypeTable.Current;
            }
		}
		
		public MstProductTypeEntity()
        {

        }
		
		public MstProductTypeEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ProductTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_ID"]));
			this.ParentTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_TYPE_ID"]));
			this.ProductTypeCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_CODE"]));
			this.ProductTypeName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_NAME"]));
			this.Category = Convert.ToString(CommonFunctions.ToObject(dr["CATEGORY"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }
		
		public MstProductTypeEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ProductTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_ID"]));
			this.ParentTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_TYPE_ID"]));
			this.ProductTypeCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_CODE"]));
			this.ProductTypeName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_NAME"]));
			this.Category = Convert.ToString(CommonFunctions.ToObject(dr["CATEGORY"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstProductTypeTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string ProductTypeId
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_PRODUCT_TYPE_ID)); }
            set { SetData(MstProductTypeTable.C_PRODUCT_TYPE_ID, value); }
        }
		
        [DataMember]
        public string ParentTypeId
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_PARENT_TYPE_ID)); }
            set { SetData(MstProductTypeTable.C_PARENT_TYPE_ID, value); }
        }
		
        [DataMember]
        public string ProductTypeCode
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_PRODUCT_TYPE_CODE)); }
            set { SetData(MstProductTypeTable.C_PRODUCT_TYPE_CODE, value); }
        }
		
        [DataMember]
        public string ProductTypeName
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_PRODUCT_TYPE_NAME)); }
            set { SetData(MstProductTypeTable.C_PRODUCT_TYPE_NAME, value); }
        }
		
        [DataMember]
        public string Category
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_CATEGORY)); }
            set { SetData(MstProductTypeTable.C_CATEGORY, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(MstProductTypeTable.C_DESCRIPTION)); }
            set { SetData(MstProductTypeTable.C_DESCRIPTION, value); }
        }
		
		#endregion
	}
	
	
}	

